package cd.cdyb.sms.dao;

import cd.cdyb.sms.domain.Company;
import cd.cdyb.sms.domain.WhiteList;
import cd.cdyb.sms.dto.WhiteListDto;
import cd.cdyb.sms.dto.expand.ExCompanyDto;
import cd.cdyb.sms.dto.query.WhiteListQueryDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WhiteListDao extends BaseMapper<WhiteList> {

    /**
     * 查询白名单列表
     *
     * @param whiteListQueryDto 查询条件
     * @param page              分页大小
     * @return 白名单列表
     */
    @Select(" select * from white_list where valid = true")
    IPage<WhiteListDto> findWhiteListPage(@Param("whiteListQueryDto") WhiteListQueryDto whiteListQueryDto, @Param("page") Page<WhiteList> page);

}
